import {
  AutoIncrement,
  Column,
  DataType,
  Model,
  PrimaryKey,
  Table,
} from 'sequelize-typescript';

@Table({
  tableName: 'user_vips',
})
export class UserVips extends Model {
  @PrimaryKey
  @AutoIncrement
  @Column({
    type: DataType.INTEGER,
    allowNull: false,
    comment: 'id',
  })
  id: number;

  //用户名称
  @Column({
    type: DataType.INTEGER,
    comment: '用户id',
  })
  userId: number;

  @Column({
    type: DataType.INTEGER,
    comment: '',
  })
  vipTypeId: number;

  @Column({
    type: DataType.DATE,
    comment: '购买日期',
  })
  purchaseDate: Date;

  @Column({
    type: DataType.INTEGER,
    comment: '已经下载的次数',
  })
  downloadTimes: number;

  @Column({
    type: DataType.INTEGER,
    comment: '是否有效',
  })
  isActive: number;

  @Column({
    type: DataType.STRING(255),
    comment: '来源',
  })
  description: string;
}
